//
//  GTMapLoactionHandleProcess.h
//  zjkd
//
//  Created by app on 17/1/20.
//  Copyright © 2017年 gtexpress. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <BaiduMapAPI_Base/BMKBaseComponent.h>//引入base相关所有的头文件
#import <BaiduMapAPI_Map/BMKMapComponent.h>//引入地图功能所有的头文件
#import <BaiduMapAPI_Search/BMKSearchComponent.h>//引入检索功能所有的头文件
#import <BaiduMapAPI_Cloud/BMKCloudSearchComponent.h>//引入云检索功能所有的头文件
#import <BaiduMapAPI_Location/BMKLocationComponent.h>//引入定位功能所有的头文件
#import <BaiduMapAPI_Utils/BMKUtilsComponent.h>//引入计算工具所有的头文件
#import <BaiduMapAPI_Radar/BMKRadarComponent.h>//引入周边雷达功能所有的头文件
#import <BaiduMapAPI_Map/BMKMapView.h>//只引入所需的单个头文件

#import "GTNearByExpressCompanyModel.h"


typedef enum : NSUInteger {
    //检索无结果
    GTMapHandleFailureWithNoResult,
    //关键字有歧义
    GTMapHandleFailureWithAmbiguous,
    //无法行使定位功能
    GTMapHandleFailureWithNoRightLocation,
    //检索发送失败
    GTMapHandleFaulurePoiSearchSendFail,
} GTMapHandleFailureType;

@protocol GTMapLocationProcessDelegate <NSObject>

- (void)mapProcessHandleWithDataSource:(NSMutableArray  *)poiResultdataSource;

- (void)mapProcessHandleFailWithType:(GTMapHandleFailureType)type;

@end

@interface GTMapLoactionHandleProcess : NSObject

//定位服务
@property (nonatomic,strong)BMKLocationService * locationSever;

//搜索服务
@property (nonatomic,strong)BMKPoiSearch * bmkSearcher;

//临时变量，存储当前位置信息
@property (nonatomic,assign)CLLocationCoordinate2D currentCoordinate;

//搜索结果数据
@property (nonatomic,strong)NSMutableArray * poiResultDataSource;

//代理
@property (nonatomic,weak)id<GTMapLocationProcessDelegate >mapDelegate;

//直接根据本机定位检索
- (void)startToPoiNearByExpressCompany;

//根据传入的地理位置检索
- (void)startToPoiNeayByWithSendInfoCoordinate:(CLLocationCoordinate2D )coordinate;

//根据传入地理位置和搜索关键字检索
- (void)startToPoiNeayByWithSendInfoCoordinate:(CLLocationCoordinate2D )coordinate andKeyword:(NSString *)keyword;

//停止检索
- (void)endPoiSearch;

@end
